package com.xinqi.modules.chat.enums.notice;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

/**
 * 发送频率 1工作日 2每天 3每月
 */
public enum NoticeSendReteEnum implements BasicEnum {
    ONE(1, "工作日"),
    TWO(2, "每天"),
    THREE(3, "每月");
    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    NoticeSendReteEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static NoticeSendReteEnum of(Integer code) {
        return BasicEnum.of(NoticeSendReteEnum.class, code);
    }
}
